← Index
NYTProf Performance Profile   
For flows_to_es.pl
  Run on Mon May 9 23:27:59 2016
Reported on Mon May 9 23:28:09 2016

Filename(eval 52)[/usr/share/perl5/Sub/Quote.pm:5]
StatementsExecuted 21 statements in 335µs
Eval Invoked At/usr/share/perl5/Sub/Quote.pm line 5
Sibling evals1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
22223µs849µsSearch::Elasticsearch::Serializer::JSON::::newSearch::Elasticsearch::Serializer::JSON::new
11112µs23µsSub::Quote::::BEGIN@4 Sub::Quote::BEGIN@4
1117µs7µsMethod::Generate::Constructor::::BEGIN@7.5 Method::Generate::Constructor::BEGIN@7.5
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1{
222µs my $_QUOTED = ${$_[1]->{"\$_QUOTED"}};
31300ns my $default_for_JSON = ${$_[1]->{"\$default_for_JSON"}};
4262µs234µs
# spent 23µs (12+11) within Sub::Quote::BEGIN@4 which was called: # once (12µs+11µs) by Sub::Quote::_clean_eval at line 4
no warnings 'closure';
# spent 23µs making 1 call to Sub::Quote::BEGIN@4 # spent 11µs making 1 call to warnings::unimport
5
# spent 849µs (23+826) within Search::Elasticsearch::Serializer::JSON::new which was called 2 times, avg 425µs/call: # once (6µs+792µs) by Search::Elasticsearch::new at line 40 of /opt/flows/lib/lib/perl5/Search/Elasticsearch.pm # once (17µs+34µs) by Search::Elasticsearch::new at line 53 of Sub/Defer.pm
sub Search::Elasticsearch::Serializer::JSON::new {
6package Method::Generate::Constructor;
7
# spent 7µs within Method::Generate::Constructor::BEGIN@7.5 which was called: # once (7µs+0s) by Sub::Quote::_clean_eval at line 12
BEGIN {
811µs $^H = "2018";
91500ns ${^WARNING_BITS} = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\003";
1016µs %^H = (
11 );
121240µs17µs}
# spent 7µs making 1 call to Method::Generate::Constructor::BEGIN@7.5
131500ns my $class = shift;
141200ns $class = ref($class) if ref($class);
151300ns if ($class ne "Search::Elasticsearch::Serializer::JSON") {
16 if ($Moo::MAKERS{$class}) {
17 Moo->_constructor_maker_for($class,"Search::Elasticsearch::Serializer::JSON");
18 return $class->new(@_);
19 } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) {
20 return $meta->new_object($class->BUILDARGS(@_));
21 }
22 }
231100ns my $args;
241800ns if ( scalar @_ == 1 ) {
251800ns unless ( defined $_[0] && ref $_[0] eq 'HASH' ) {
26 die "Single parameters to new() must be a HASH ref"
27 ." data => ". $_[0] ."\n";
28 }
2912µs $args = { %{ $_[0] } };
30 }
31 elsif ( @_ % 2 ) {
32 die "The new() method for $class expects a hash reference or a key/value list."
33 . " You passed an odd number of arguments\n";
34 }
35 else {
36 $args = {@_};
37 }
3811µs my $new = bless({}, $class);;
3916µs134µs $new->{"JSON"} = (
40 exists $args->{"JSON"}
41 ? $args->{"JSON"}
42 : $default_for_JSON->($new)
43 );
441800ns $new->{"mime_type"} = (
45 exists $args->{"mime_type"}
46 ? $args->{"mime_type"}
47 : "application/json"
48 );
4914µs return $new;
50 }
5111µs $_QUOTED->[3] = \&Search::Elasticsearch::Serializer::JSON::new
52}
5315µs1;
54
55;